package com.a0soft.gphone.aTruffleHog.util;
/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 3, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * Copyright(C) 2011 
 *   Sam Lu <ysl.sam.lu (at) gmail.com>
 *
 */

public class aDebug {
	public static final boolean ENABLED = CONSTS.ENABLE_DEBUG_LOG;
	
	public static void
    d(String LOG_TAG, String strMsg)
    {
        if (ENABLED)
            android.util.Log.d(LOG_TAG, strMsg);
    }
    
    public static void
    d(String LOG_TAG, String strMsg, Throwable t)
    {
        if (ENABLED)
            android.util.Log.d(LOG_TAG, strMsg, t);
    }
    
    public static void
    w(String LOG_TAG, String strMsg)
    {
        if (ENABLED)
            android.util.Log.w(LOG_TAG, strMsg);
    }
    
    public static void
    w(String LOG_TAG, String strMsg, Throwable t)
    {
        if (ENABLED)
            android.util.Log.w(LOG_TAG, strMsg, t);
    }
    
    public static void
    e(String LOG_TAG, String strMsg)
    {
        if (ENABLED) {
            android.util.Log.e(LOG_TAG, strMsg);
            throw new IllegalArgumentException();
        }
    }
    
    public static void
    e(String LOG_TAG, String strMsg, Throwable t)
    {
        if (ENABLED) {
            android.util.Log.e(LOG_TAG, strMsg, t);
            throw new IllegalArgumentException();
        }
    }
}
